<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - TreeField Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/fonts/fonts-min.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

 <body>

<p class='demoTitle'>inputEx - TreeField Usage</p>


<!-- Example 1 -->
<div class='exampleDiv'>

	<p class="title">Basic TreeField creation</p>
	
	<p>Use the following code to create a basic inputEx TreeField.</p>

	<div class='demoContainer' id='container1'></div>

	<div class='codeContainer'>
		<form>
		<textarea name="code" class="JScript">
			new YAHOO.inputEx.TreeField({parentEl: 'container1', 
				elementType: {
						type: 'inplaceedit', 
						formatValue: function(val) { return "<img src='"+val+"favicon.ico'>"+val; }, 
						inputParams: { 
							editorField: {type: 'string', inputParams: {} },
							value: 'Edit me'
						} 
				}
			});
		</textarea>
		</form>
	</div>

</div>


<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/yahoo/yahoo-min.js"></script> 
<script type="text/javascript" src="../lib/yui/dom/dom-min.js"></script> 
<script type="text/javascript" src="../lib/yui/event/event-min.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>
<script type="text/javascript" src="../lib/yui/animation/animation-min.js"></script>

<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/Visus.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/UrlField.js"  type='text/javascript'></script>
<script src="../js/fields/InPlaceEdit.js"  type='text/javascript'></script>
<script src="../js/fields/ListField.js"  type='text/javascript'></script>
<script src="../js/fields/TreeField.js"  type='text/javascript'></script>

<script>

YAHOO.util.Event.addListener(window, 'load', function() {
	// Required for the ListField
	YAHOO.inputEx.spacerUrl = "../images/space.gif";

	// Example 1
	new YAHOO.inputEx.TreeField({parentEl: 'container1', 
		elementType: {
				type: 'inplaceedit', 
				formatValue: function(val) { return "<img src='"+val+"favicon.ico'>"+val; }, 
				inputParams: { 
					editorField: {type: 'string', inputParams: {} },
					value: 'Edit me'
				} 
		}
	});
	
});

</script>

<script src="js/dpSyntaxHighlighter.js"></script>
<script language="javascript"> 
dp.SyntaxHighlighter.HighlightAll('code');
</script>

 </body>
</html>